
clear
use C:\Users\km0194\Desktop\LiffMaeda.dta

gen mainrivalv=vshare_r-margin if rank==1
replace mainrivalv=winvshare if rank!=1
gen ldpminuskompr9=votes-(pr_kom*.9)
gen ldpminuskompr8=votes-(pr_kom*.8)
gen ldpminuskompr7=votes-(pr_kom*.7)
gen ldpminuskompr6=votes-(pr_kom*.6)
gen ldpminkomshare9=ldpminuskompr9/totvotes*100
gen ldpminkomshare8=ldpminuskompr8/totvotes*100
gen ldpminkomshare7=ldpminuskompr7/totvotes*100
gen ldpminkomshare6=ldpminuskompr6/totvotes*100

* would-be LDP winners after subtracting 80% of Komeito votes (shown in Table 1)
count if mainrivalv<ldpminkomshare8 & year==2000
count if mainrivalv<ldpminkomshare8 & year==2003
count if mainrivalv<ldpminkomshare8 & year==2005
count if mainrivalv<ldpminkomshare8 & year==2009
count if mainrivalv<ldpminkomshare8 & year==2012
count if mainrivalv<ldpminkomshare8 & year==2014
count if mainrivalv<ldpminkomshare8 & year==2017

* would-be LDP winners if 90% is subtracted 
count if mainrivalv<ldpminkomshare9
* would-be LDP winners if 70% is subtracted 
count if mainrivalv<ldpminkomshare7
* would-be LDP winners if 60% is subtracted 
count if mainrivalv<ldpminkomshare6




